package com.training.bt.entity;

import java.time.LocalDateTime;


import com.baomidou.mybatisplus.annotation.*;
import com.training.bt.enums.ReviewStatus;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName("resource")
public class Resource {

    @TableId(type=IdType.AUTO)
    private Long id;

    private String title;

    private String description;

    private String filePath;

    @TableField("uploader_id")
    private Long uploader;

    private LocalDateTime uploadTime;

    private Boolean visible;

    @EnumValue
    private ReviewStatus reviewStatus;

    private String rejectReason;

    private Long size;

    private int points;

    @Builder.Default
    private Long downloadCount = 0L;

    private String coverImageUrl;
}
